package com.fang.common.exception;

import com.fang.common.common.ResultCode;

/**
 * @author Bernie_fang
 * @Description:
 * @create 2024/10/3 14:12
 **/
public class ExceptionCode {
    public static class CommonCode {
        public static ResultCode SUCCESS = new ResultCode("0000", "SUCCESS");
        public static ResultCode NOT_LOGIN = new ResultCode("1000", "NOT_LOGIN(1000)");
        public static ResultCode LOGIN_INFORMATION_INVALID = new ResultCode("1000", "LOGIN_INFORMATION_INVALID(1000)");
        public static ResultCode PERMISSION_DENIED = new ResultCode("1001", "PERMISSION_DENIED(1001)");
        public static ResultCode ARGUMENT_NOT_VALID = new ResultCode("1001", "ARGUMENT_NOT_VALID(1001)");

        public static ResultCode SERVER_BUSY = new ResultCode("9994", "SERVER_BUSY(9994)");
        public static ResultCode SERVER_NOT_FOUND = new ResultCode("9995", "SERVER_NOT_FOUND(9995)");
        public static ResultCode SQL_ERROR = new ResultCode("9996", "SQL_ERROR(9996)");
        public static ResultCode DB_ERROR = new ResultCode("9997", "DB_ERROR(9997)");
        public static ResultCode SYSTEM_BUSY = new ResultCode("9998", "SYSTEM_BUSY(9998)");
        public static ResultCode SYSTEM_ERROR = new ResultCode("9999", "SYSTEM_ERROR(9999)");
    }

    /**
     * 用户未登录
     */
    public static final ResultCode USER_NOT_LOGIN = new ResultCode("0101", "USER_NOT_LOGIN(0101)");
    /**
     * 账号不可用
     */
    public static final ResultCode USER_ACCOUNT_UNAVAILABLE = new ResultCode("0102", "USER_ACCOUNT_UNAVAILABLE(0102)");
    /**
     * 密码错误
     */
    public static final ResultCode USER_PASSWORD_ERROR = new ResultCode("0103", "USER_PASSWORD_ERROR(0103)");
    /**
     * 密码过期
     */
    public static final ResultCode USER_PASSWORD_EXPIRED = new ResultCode("0104", "USER_PASSWORD_EXPIRED(0104)");
    /**
     * 账号被锁定
     */
    public static final ResultCode ACCOUNT_LOCKED = new ResultCode("0105", "ACCOUNT_LOCKED(0105)");
    /**
     * 账号不存在
     */
    public static final ResultCode ACCOUNT_NOT_EXIST = new ResultCode("0106", "ACCOUNT_NOT_EXIST(0106)");
    /**
     * 账号已存在
     */
    public static final ResultCode ACCOUNT_ALREADY_EXIST = new ResultCode("0107", "ACCOUNT_ALREADY_EXIST(0107)");
    /**
     * 权限不足
     */
    public static final ResultCode PERMISSION_DENIED = new ResultCode("0108", "PERMISSION_DENIED(0108)");
    /**
     * 登录状态过期
     */
    public static final ResultCode LOGIN_EXPIRED = new ResultCode("0109", "LOGIN_EXPIRED(0109)");

    /**
     * 数据重复
     */
    public static final ResultCode DATA_DUPLICATE = new ResultCode("0121", "DATA_DUPLICATE(0121)");

    /**
     * 参数异常
     */
    public static final ResultCode PARAM_ABNORMALITY = new ResultCode("1001", "PARAM_ABNORMALITY(1001)");

}
